package com.xiaoshuidi.cloud.module.finance.enums.invoice;

import lombok.Getter;

@Getter
public enum BwSsbmEnum {
    COLLECT_WATER("1100301010000000000","代收水费"),
    PROPERTY_MANAGE("3040801010000000000","物业管理费"),
    PARKING_SPACE_MANAGE("3040801010000000000","产权车位管理费"),
    SERVICE_CHARGE("3040801010000000000","服务费"),
    RENT("3040502020400000000","租金"),
    PARKING_FEE("3040502020200000000","停车费"),
    COLLECT_ELECTRICITY("1100101020200000000","代收电费")
    ;

    private String serviceCode;

    private String summary;

    BwSsbmEnum(String serviceCode, String summary) {
        this.serviceCode = serviceCode;
        this.summary = summary;
    }

    public static String getServiceCode(String summary) {
        for (BwSsbmEnum bwSsbmEnum : BwSsbmEnum.values()) {
            if (summary.equals(bwSsbmEnum.getSummary())) {
                return bwSsbmEnum.serviceCode;
            }
        }
        return null;
    }
}
